﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WimaxSimulator.Wimax;

namespace WimaxSimulator.Gui
{
    public partial class InputForm : Form
    {
        Station s1, s2;
        public InputForm(Station s1,Station s2)
        {
            this.s1 = s1;
            this.s2=s2;
            InitializeComponent();
            sourceTextBox.Text = s1.Id + "";
            destinationTextBox.Text = s2.Id + "";
            endTimeUpDown.Value = SimulationEngine.SimulationDuration;
        }

        private void acceptButton_Click(object sender, EventArgs e)
        {
            if (s1 is MobileStation)
            {
                (s1 as MobileStation).addTraffic(s2.Id, (int)startTimeUpDown.Value, (int)endTimeUpDown.Value);
            }
            this.Close();
        }
    }
}
